(function () {
    var EVENT_CLICK = Laya.Event.CLICK;
    var io = ppt.io;

    function Menu() {
        Menu.super(this);

        this.init();
    }
    Laya.class(Menu, "Com.Home.Menu", ui.Home.MenuUI);
    var _proto = Menu.prototype;

    _proto.init = function () {
        this.btnShop.on(EVENT_CLICK, this, function () {
            ppt.director.runScene(new Scene.Shop());
        });
        this.btnRace.on(EVENT_CLICK, this, function () {
            ppt.director.runScene(new Scene.Matching());
        });
        this.btnChallenge.on(EVENT_CLICK, this, function () {
            io.emit({cmd:'pve::wait', params : {type : 6}});
        });
        this.btnRole.on(EVENT_CLICK, this, function () {
            ppt.director.runScene(new Scene.Role());
        });
        this.btnBag.on(EVENT_CLICK, this, function () {
            ppt.director.runScene(new Scene.Props());
        });
    }
})();